package com.igeek.boot.controller;

import com.igeek.boot.client.OrdersClient;
import com.igeek.boot.entity.Orders;
import com.igeek.boot.service.OrdersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author fengqq
 * @Description TODO
 * @Date 2024/8/23  9:44
 */
@RestController
@RequestMapping("/orders")
@Api(tags = "订单模块的控制层")
public class OrdersController {

    @Autowired
    private OrdersClient ordersClient;

    @PostMapping("/submit")
    @ApiOperation("提交预约")
    //提交预约
    public boolean submitOrder(Orders order){
        boolean flag = ordersClient.submit(order);
        return flag;
    }
}
